#!/usr/bin/lua 

function isPrime(num) 
    if num <= 0 then
        num = -num
    end

    prime = true
    count = num / 2
    while count > 1 do
        if num % count == 0 then
            prime = false
            break
        end
    end

    if prime == true then
        print(num, " is a prime")
    end
end

for index = 1, 1000 do
    isPrime(index)
end
